﻿namespace AbpCodeGenerater
{
    public static class WindowHelper
    {
        public static string MakeSurePathExists(this string path)
        {
            if (string.IsNullOrEmpty(path)) return path;

            var fileInfo = new FileInfo(path);
            if (fileInfo.Directory != null && !fileInfo.Directory.Exists)
            {
                Directory.CreateDirectory(fileInfo.Directory.FullName);
            }

            return path;
        }
    }
}
